package com.cskaoyan.service;

import com.cskaoyan.bean.MarketPermissionType;
import com.cskaoyan.bean.MarketRole;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.admin.role.permissions.ParentType;

import java.util.List;

/**
 * @Author: JianhuaZeng
 * @Date: 2022/12/29 20:52
 */
public interface RoleService {

    List<MarketRole> allRole();

    Integer createRole(MarketRole marketRole);

    CommonData<MarketRole> list(BasePageInfo pageInfo);

    void update(MarketRole marketRole);

    int delete(MarketRole marketRole);

    List<String> getRolePermissions(int roleId);

    List<ParentType> getSysPermissions();

    List<MarketPermissionType> getSysPermissionsByTypeAndPid(int type, Integer pid);

    void updatePermissionByRoleId(int roleId, List<String> permissions);
}
